package org.colafries.common.metadata;

import lombok.Data;

import java.util.List;

/**
 * @author colafries
 * @version v1.0
 * @ClassName Schema
 * @Description
 * @date Created in 2024/3/19
 **/
@Data
public class Schema {
    private String schemaName;
    private List<Table> tables;

    public Schema() {
    }

    public Schema(String schemaName) {
        this.schemaName = schemaName;
    }

    // 添加一个方法用于检查是否包含指定表名的表
    public boolean containsTable(String tableName) {
        return tables.stream().anyMatch(table -> table.getName().equals(tableName));
    }
}
